<style>
</style>

<template>
<div class="page-my-pages">
 <z-space vertical>
<!--   <el-button @click="changeConfig">改变tongji配置 组件会即时修改</el-button>-->
<!--   <div>{{testObj.panelOption}}</div>-->

   <z-page-design >
     <z-my-page :obj="testObj" >
       <template #list_item_content="scope">
         <div style="height: 120px;">{{scope.getColumnByKey('sourceTable1')}}</div>
       </template>
     </z-my-page>
   </z-page-design>
 </z-space>


</div>
</template>
<script>
import {EditCom, DetailCom} from "@example/views/pages/test.jsx";
import VueCodeMirror from "@example/components/VueCodeMirror";
import RemoteFileViewer from "@example/plugins/example/components/RemoteFileViewer";

import itemCom from "@example/views/pages/components/ItemCom";
CustomCusComponent.registerOnce(itemCom)

export default {
  components: {RemoteFileViewer, VueCodeMirror},
  data() {
    return {
      testObj: {
        treeOption: {
          url: '/api/demo1/menu',
          rightMenu: [
            {
              name: '复制',
              command: 'copy'
            },
            {
              name: '转发',
              command: 'send'
            }
          ]
        },
        panelOption: {
          url: '/api/demo1/tongji',
        },
        tableOption: {
          defaultUrl: '/api/list',
          urlMap: {
            batchDel: '/api/del'
          },
          viewProps: {
            itemComponentName: itemCom.name
          }
        },
        EditCom,
        DetailCom
      },
    }
  },
  methods: {
    changeConfig() {
      let arr = [
          '/api/demo1/tongji',
          '/api/demo1/tongji_2'
      ]
      this.testObj.panelOption.url =
          this.testObj.panelOption.url === arr[0] ? arr[1] : arr[0]
    }
  }
}
</script>
